﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IPC.Communication.Core.Address;
using IPC.Communication.Profinet.Melsec;

namespace IPC.Communication.Profinet.Keyence
{
    public class KeyenceMcNet : MelsecMcNet
    {
        public KeyenceMcNet()
        {
        }

        public KeyenceMcNet(string ipAddress, int port)
            : base(ipAddress, port)
        {
        }

        public override OperateResult<McAddressData> McAnalysisAddress(string address, ushort length)
        {
            return McAddressData.ParseKeyenceFrom(address, length);
        }

        public override string ToString()
        {
            return String.Format("KeyenceMcNet[{0}:{1}]", IpAddress, Port);
        }
    }
}